body {
  background-color: #101216;
}

nav {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 38px 0;
  -webkit-app-region: drag;
  overflow-y: auto;

  &::-webkit-scrollbar {
    width: 8px;
  }

  ul {
    list-style: none;
    padding: 0;
    margin: 0;

    li {
      padding: 0;
      user-select: none;

      a {
        padding: 8px 20px;
        display: block;
        cursor: pointer;
        text-decoration: none;

        &:hover {
          background: rgba(255, 255, 255, 0.2);
        }

        &[active] {
          background: var(--theme-default-fg);
          color: var(--theme-default-bg);
        }
      }

      .close-button {
        float: right;
      }
    }
  }
}

main {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;

  &.loading {
    background-color: var(--theme-default-bg);
    display: flex;
    justify-content: center;
    align-items: center;

    // From https://github.com/tobiasahlin/SpinKit
    // MIT License
    .spinner {
      margin: 100px auto;
      width: 60px;
      height: 40px;
      text-align: center;
      font-size: 10px;
    }

    .spinner > div {
      background-color: var(--theme-accent);
      margin: 0 3px;
      height: 100%;
      width: 6px;
      display: inline-block;
      animation: sk-stretchdelay 1.2s infinite ease-in-out;
    }

    .spinner .rect2 {
      animation-delay: -1.1s;
    }

    .spinner .rect3 {
      animation-delay: -1.0s;
    }

    .spinner .rect4 {
      animation-delay: -0.9s;
    }

    .spinner .rect5 {
      animation-delay: -0.8s;
    }

    @keyframes sk-stretchdelay {
      0%, 40%, 100% {
        transform: scaleY(0.4);
      }  20% {
        transform: scaleY(1.0);
      }
    }
  }

  webview {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    visibility: hidden;
    outline: none;

    &[loading] {
      transform: translateY(1000%);
      visibility: visible;
    }

    &[active] {
      visibility: visible;
      background-color: var(--theme-default-bg);
    }
  }
}
